package com.mathdroid.model.abilities.specs.sniper;

import com.mathdroid.model.abilities.Ability;
import com.mathdroid.model.enums.EDmgType;

public final class SeriesOfShots extends Ability {

	/**
	 * Generated UID.
	 */
	private static final long serialVersionUID = 89065122162946538L;

	/* channeling time = 3 */

	public SeriesOfShots() {
		this.setName("Series of Shots");
		this.setIconName("reactiveshots");
		this.setResource("Energy");
		this.setCost(20d);
		this.setCooldownMs(15000d);
		this.setPeriodicDamageType(EDmgType.ENERGY);
		
		this.setStandardHealthPercentMax(0.098);
		this.setStandardHealthPercentMin(0.098);	
		this.setAmountModifierPercent(-0.348);
		this.setCoefficient(0.98);
		
		this.setTrainableLevel(36);
		
		this.setPeriodicInterval(1000d);
	}
	
	@Override
	public String getDescription() {
		return "Unleashes a series of shots that deals " 
		+ this.getMinPeriodic() + " - " + this.getMaxPeriodic() +
			" weapon damage over the duration. Must be in cover to use.";
	}

	@Override
	public double getMinPeriodic() {
		return
			this.getAmountModifierPercent() 
			* this.getCharStats().getRangedDamagePrimaryMin()
		
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
		
			+ this.getStandardHealthPercentMin() 
			* this.getStdDmg();
	}

	@Override
	public double getMaxPeriodic() {
		return 
			this.getAmountModifierPercent()
			* this.getCharStats().getRangedDamagePrimaryMax()
			
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
			
			+ this.getStandardHealthPercentMax() 
			* this.getStdDmg();
	}

	@Override
	public double getMinDirect() {
		return 0d;
	}

	@Override
	public double getMaxDirect() {
		return 0d;
	}
}
